<?php defined('SYSPATH') or die('No direct script access.');
$ss						= Session::instance();
$thesystems		= Helper_theSystems::factory();
$myfunctions	= Helper_myFunctions::factory();
$display			= Helper_DisplayItems::factory();
$arraylist			= Helper_arraylist::factory();

$detail_types	= $thesystems->system_auth('module_products_detail_type');

$r = Request::current();
$action = URL::site($r->uri2());

$logstatus	=	$ss->get('logstatus');
?>

<style type="text/css">
.menuBlock
{
	display: block;
	overflow: auto;

}
.subMenublock
{
	background-color: transparent;
	margin: 5px;
	padding: 5px;
	clear: none;
	border: 1px solid #BBB;
	border-radius: 5px;
}
.subMenublock:hover
{
	background-color: transparent;
}


.noBorder, .noBorderInHover
{
	border: 1px solid transparent;
}

.noBorder:hover
{
	border: 1px solid #EEE;
	border-radius: 4px 4px 0px 0px;
}

</style>

<?php
// Links
$logout        = URL::site($r->uri2(array('action'=>'logout')));
$profile       = URL::site($r->uri2(array('action'=>'profile')));

$home          = URL::site($r->uri2(array('action'=>'index')));

$help          = URL::site($r->uri2(array('action'=>'help')));
?>

<?php //if($logstatus != '' && $logstatus <= 299) {    // Show Menu if Logged In <---- Start ----> ?>
<div class="navbar">
  <div class="navbar-inner">
    <div class="container">
    		<div class="btn-group pull-right" style="margin: 5px 20px 5px 5px;">
					<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
						<li class="icon16 icon16-black icon16-users"></li>
						<span class="visible-desktop"><?php echo $display->show_value($ss->get('logid'), 'users','nama'); ?></span>
						<span class="caret"></span>
					</a>
					<ul class="dropdown-menu">
						<li><a href="<?php echo URL::base() ?>pos/logout">Keluar</a></li>
					</ul>
				</div>
	    <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
	    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
	    <span class="icon32 icon32-white icon32-book"></span>
	    </a>
     	
     	<span class="brand" style="text-shadow: none;">PT. Jala Anugerah Sejati</span>
     	
	    <!-- Everything you want hidden at 940px or less, place within here -->
	    <div class="nav-collapse collapse">
				<ul class="nav">
					
					<li class="nav nav-tabs">
						<a href="<?php echo $home; ?>">dashboard</a>
					</li>
					
					<?php if($logstatus <= 700) { ?>
					<!-- Back Office Administration **Start** -->
					<?php
						$karyawan                 = URL::site($r->uri2(array('action'=>'karyawan')));
						$pelanggan                = URL::site($r->uri2(array('action'=>'pelanggan')));
						$truk                     = URL::site($r->uri2(array('action'=>'mastertruk')));
						$sukuCadang               = URL::site($r->uri2(array('action'=>'mastersukucadang')));
						$posisi                   = URL::site($r->uri2(array('action'=>'posisi')));
						$vo                       = URL::site($r->uri2(array('action'=>'vo')));
						$suratjalan               = URL::site($r->uri2(array('action'=>'suratjalan')));
						$sttb                     = URL::site($r->uri2(array('action'=>'sttb')));
						$pembayaran               = URL::site($r->uri2(array('action'=>'pembayaran')));
						$sppsc                    = URL::site($r->uri2(array('action'=>'sppsc')));
						$spsc                     = URL::site($r->uri2(array('action'=>'spsc')));
						$po                       = URL::site($r->uri2(array('action'=>'po')));
						$spkp                     = URL::site($r->uri2(array('action'=>'spkp')));
						$suratpermintaansc        = URL::site($r->uri2(array('action'=>'suratpermintaansc')));
						$perbaikan                = URL::site($r->uri2(array('action'=>'perbaikan')));
						$penyelesaiankerja        = URL::site($r->uri2(array('action'=>'penyelesaiankerja')));
						$pengeluaransukucadang    = URL::site($r->uri2(array('action'=>'pengeluaransukucadang')));
						$penerimaanbarangmasuk    = URL::site($r->uri2(array('action'=>'penerimaanbarangmasuk')));
						$salesorder               = URL::site($r->uri2(array('action'=>'salesorder')));
						$perjanjiankontrak        = URL::site($r->uri2(array('action'=>'perjanjiankontrak')));
						$jeniskiriman             = URL::site($r->uri2(array('action'=>'jeniskiriman')));
						$jenissukucadang          = URL::site($r->uri2(array('action'=>'jenissukucadang')));
						$jenistruk                = URL::site($r->uri2(array('action'=>'jenistruk')));
						$kota                     = URL::site($r->uri2(array('action'=>'kota')));
						$mereksukucadang          = URL::site($r->uri2(array('action'=>'mereksukucadang')));
						$merekTruk                = URL::site($r->uri2(array('action'=>'merektruk')));
						$lappenyewaan             = URL::site($r->uri2(array('action'=>'lappenyewaan')));
						$lappengeluaransukucadang = URL::site($r->uri2(array('action'=>'lappengeluaransukucadang')));
						$tipesukucadang           = URL::site($r->uri2(array('action'=>'tipesukucadang')));

					?>
				<?php if($logstatus != 200) { ?>
				<?php if($logstatus != 300) { ?>
				<?php if($logstatus != 400) { ?>
				<?php if($logstatus != 500) { ?>
				<?php if($logstatus != 600) { ?>
				<?php if($logstatus != 700) { ?>
			    <ul class="nav nav-tabs">
				    <li class="dropdown">
					    <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Back Office Administration">
								<span class="visible-desktop">Master</span>
								<span class="hidden-desktop">Back Office Master</span>
					    </a>
							
					    <ul class="dropdown-menu">
					    	<span class="nav-header visible-desktop">Back Office Master</span>
								<div class="row" style="margin: 0px 5px; width: 305px; float: left;">
					    			<span class="span3 subMenublock">
										<li><a href="<?php echo $karyawan; ?>">Karyawan</a></li>
										<li><a href="<?php echo $pelanggan; ?>">pelanggan</a></li>
										<li><a href="<?php echo $truk; ?>">Truk</a></li>
										<li><a href="<?php echo $sukuCadang; ?>">Suku Cadang</a></li>
										<li><a href="<?php echo $posisi; ?>">Posisi</a></li>
										<li><a href="<?php echo $merekTruk; ?>">Merek Truk </a></li>
										<li><a href="<?php echo $jenistruk; ?>">Jenis Truk </li>
										<li><a href="<?php echo $jeniskiriman; ?>">Jenis Kiriman </a></li>
										<li><a href="<?php echo $jenissukucadang; ?>">Jenis Sukucadang </a></li>
										<li><a href="<?php echo $mereksukucadang; ?>">Merek Sukucadang </a></li>
										<li><a href="<?php echo $tipesukucadang; ?>">Tipe Sukucadang </a></li>
										<li><a href="<?php echo $kota; ?>">Kota </a></li>
									</span>
					    		
								</div>
					    </ul>
				    </li>
			    </ul>
			    <?php } ?>
			    <?php } ?>
			    <?php } ?>
			    <?php } ?>
			    <?php } ?>
			    <?php } ?>

			    <?php if($logstatus != 300) { ?>
			    <?php if($logstatus != 600) { ?>
			    <ul class="nav nav-tabs">
				    <li class="dropdown">
					    <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Back Office Administration">
								<span class="visible-desktop">Penyewaan</span>
								<span class="hidden-desktop">Back Office Penyewaan</span>
					    </a>
							
					    <ul class="dropdown-menu">
					    	<span class="nav-header visible-desktop">Back Office Penyewaan</span>
								<div class="row" style="margin: 0px 5px; width: 305px; float: left;">
					    			<span class="span3 subMenublock">
					    				<li class="nav-header">Penyewaan</li>
					    				<?php if($logstatus != 400) { ?>
					    				<?php if($logstatus != 500) { ?>
					    				<?php if($logstatus != 700) { ?>
										<li><a href="<?php echo $perjanjiankontrak; ?>">Surat Perjanjian Kontrak</a></li>
										<?php } ?>
										<?php } ?>
										<?php } ?>
										<?php if($logstatus != 200) { ?>
										<?php if($logstatus != 400) { ?>
										<?php if($logstatus != 700) { ?>
										<li><a href="<?php echo $salesorder; ?>">Sales Order</a></li>
										<?php } ?>
										<?php } ?>
										<?php if($logstatus != 500) { ?>
										<?php if($logstatus != 700) { ?>
										<li><a href="<?php echo $vo; ?>">Voucher Order</a></li>
										<li><a href="<?php echo $suratjalan; ?>">Surat Jalan</a></li>
										<?php } ?>
										<?php } ?>
										<?php if($logstatus != 400) { ?>
										<?php if($logstatus != 500) { ?>
										<?php if($logstatus != 700) { ?>
										<li><a href="<?php echo $sttb; ?>">Surat Tanda Terima Barang</a></li>
										<?php } ?>
										<li><a href="<?php echo $pembayaran; ?>">Pembayaran</a></li>
										<?php } ?>
										<?php } ?>
										<?php } ?>
									</span>
					    		
								</div>
					    </ul>
				    </li>
			    </ul>
			    <?php } ?>
			    <?php } ?>

			    <?php if($logstatus != 200) { ?>
			    <?php if($logstatus != 400) { ?>
			    <?php if($logstatus != 500) { ?>
			    <?php if($logstatus != 700) { ?>
			    <ul class="nav nav-tabs">
				    <li class="dropdown">
					    <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Back Office Administration">
								<span class="visible-desktop">Pembeliaan</span>
								<span class="hidden-desktop">Back Office Pembelian</span>
					    </a>
							
					    <ul class="dropdown-menu">
					    	<span class="nav-header visible-desktop">Back Office Pembelian</span>
								<div class="row" style="margin: 0px 5px; width: 370px; float: left;">
					    			<span class="span3 subMenublock" style="width: 350px;">
					    				<li class="nav-header">Pembelian</li>
										<li><a href="<?php echo $sppsc; ?>">Surat Permintaan Pembelian Suku Cadang</a></li>
										<?php if($logstatus != 600) { ?>
										<li><a href="<?php echo $spsc; ?>">Surat Pembelian Suku Cadang</a></li>
										<li><a href="<?php echo $po; ?>">Purchase Order</a></li>
										<?php } ?>
									</span>
					    		
								</div>
					    </ul>
				    </li>
			    </ul>
			    <?php } ?>
			    <?php } ?>
			    <?php } ?>

			    <?php if($logstatus != 300) { ?>
			    <?php if($logstatus != 400) { ?>
			    <?php if($logstatus != 500) { ?>
			    <?php if($logstatus != 700) { ?>
			    <ul class="nav nav-tabs">
				    <li class="dropdown">
					    <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Back Office Administration">
								<span class="visible-desktop">Perbaikan</span>
								<span class="hidden-desktop">Back Office Perbaikan</span>
					    </a>
							
					    <ul class="dropdown-menu">
					    	<span class="nav-header visible-desktop">Back Office Perbaikan</span>
								<div class="row" style="margin: 0px 5px; width: 370px; float: left;">
					    			<span class="span3 subMenublock" style="width: 350px;">
					    				<li class="nav-header">Perbaikan</li>
										<li><a href="<?php echo $spkp; ?>">Surat Perintah Kerja Perbaikan</a></li>
										<li><a href="<?php echo $suratpermintaansc; ?>">Surat Permintaan Suku Cadang</a></li>
										<?php if($logstatus != 600) { ?>
										<li><a href="<?php echo $perbaikan; ?>">Perbaikan</a></li>
										<li><a href="<?php echo $penyelesaiankerja; ?>">Surat Penyelesaian Kerja</a></li>
										<?php } ?>
									</span>
					    		
								</div>
					    </ul>
				    </li>
			    </ul>
			    <?php } ?>
			    <?php } ?>
			    <?php } ?>
			    <?php } ?>

			    <?php if($logstatus != 400) { ?>
			    <?php if($logstatus != 500) { ?>
			    <?php if($logstatus != 700) { ?>
			    <ul class="nav nav-tabs">
				    <li class="dropdown">
					    <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Back Office Administration">
								<span class="visible-desktop">Persedian</span>
								<span class="hidden-desktop">Back Office Persedian</span>
					    </a>
							
					    <ul class="dropdown-menu">
					    	<span class="nav-header visible-desktop">Back Office Persedian</span>
								<div class="row" style="margin: 0px 5px; width: 370px; float: left;">
					    			<span class="span3 subMenublock" style="width: 350px;">
					    				<li class="nav-header">Persedian</li>
					    				<?php if($logstatus != 300) { ?>
										<li><a href="<?php echo $pengeluaransukucadang; ?>">Surat Pengeluaran Suku Cadang</a></li>
										<?php } ?>
										<?php if($logstatus != 600) { ?>
										<li><a href="<?php echo $penerimaanbarangmasuk; ?>">Surat Penerimaan Barang Masuk</a></li>
										<?php } ?>
									</span>
					    		
								</div>
					    </ul>
				    </li>
			    </ul>
			    <?php } ?>
				<?php } ?>
				<?php } ?>
				<?php } ?>

				<?php if($logstatus != 400) { ?>
				<?php if($logstatus != 500) { ?>
				<ul class="nav nav-tabs">
				    <li class="dropdown">
					    <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Back Office Administration">
								<span class="visible-desktop">Laporan</span>
								<span class="hidden-desktop">Back Office Laporan</span>
					    </a>
							
					    <ul class="dropdown-menu">
					    	<span class="nav-header visible-desktop">Back Office Laporan</span>
								<div class="row" style="margin: 0px 5px; width: 370px; float: left;">
					    			<span class="span3 subMenublock" style="width: 350px;">
					    				<li class="nav-header">Laporan</li>
					    				<?php
										$lapperbaikan         = URL::site($r->uri2(array('action'=>'lapperbaikan')));
										$lappembeliansc       = URL::site($r->uri2(array('action'=>'lappembeliansc')));
										$lappembelian         = URL::site($r->uri2(array('action'=>'lappembelian')));
										$lappenerimaansc      = URL::site($r->uri2(array('action'=>'lappenerimaansc')));
										$lappengeluaransc     = URL::site($r->uri2(array('action'=>'lappengeluaransc')));
										$lappenyelesaiankerja = URL::site($r->uri2(array('action'=>'lappenyelesaiankerja')));
										$lapkeuangan          = URL::site($r->uri2(array('action'=>'lapkeuangan')));
					    				?>
					    				<?php if($logstatus != 300) { ?>
					    				<?php if($logstatus != 600) { ?>
										<li><a href="<?php echo $lappenyewaan; ?>">Penyewaan</a></li>
										<?php } ?>
										<?php if($logstatus != 700) { ?>
										<li><a href="<?php echo $lapperbaikan; ?>">Perbaikan</a></li>
										<?php } ?>
										<?php } ?>
										<?php if($logstatus != 600) { ?>
										<?php if($logstatus != 700) { ?>
										<li><a href="<?php echo $lappembelian; ?>">Pembelian Suku Cadang</a></li>
										<?php } ?>
										<?php } ?>
										<?php if($logstatus != 300) { ?>
										<?php if($logstatus != 700) { ?>
										<li><a href="<?php echo $lappenerimaansc; ?>">Persediaan Suku Cadang</a></li>
										<li><a href="<?php echo $lappengeluaransc; ?>">Pengeluaran Suku Cadang</a></li>
										<li><a href="<?php echo $lappenyelesaiankerja; ?>">Penyelesaian Kerja</a></li>
										<?php } ?>
										<?php } ?>
										<?php if($logstatus != 600) { ?>
										<?php if($logstatus != 700) { ?>
										<li><a href="<?php echo $lapkeuangan; ?>">Laporan Keuangan</a></li>
										<?php } ?>
										<?php } ?>
									</span>
					    		
								</div>
					    </ul>
				    </li>
			    </ul>		
			    <?php } ?>  
			    <?php } ?>  


					
				    </li>
			    </ul>
					<!-- Reports Module **End** -->
					<?php } ?>
					
				</ul>
	    </div>
    </div>
  </div>
</div>

<?php //} // Show Menu if Logged In <---- End ----> ?>

























